<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
<base th:href="@{/}">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<th:block th:include ="commHeaderInclude::commHead"></th:block>
<th:block th:include="commHeaderInclude::formPageComm"></th:block>
<title>医保信息查询</title>
</head>

<body class="ht">
<th:block th:include="commHeaderInclude::loading"></th:block>
	<div class="tabTitle"><span><i class="mdi mdi-menu-up"></i>医保信息查询</span></div>
	<div class="content-wrapper">
		<div class="breadCrumb">
			<i class="mdi mdi-map-marker"></i>
			<span>医保贷业务系统<i class="mdi mdi-chevron-double-right"></i>医保信息查询</span>
		</div>

		<div class="alert alert-warning">
			<!-- <i class=" mdi mdi-alert-circle"></i> -->
			<p>① 仅支持查询存在有效授权的医保定点机构；如授权失效，请联系医保定点机构重新授权。</p>
			<p class="mt-1">② 查询成功后，请务必在5个工作日内查看及下载，过期需重新申请查询。</p>
		</div>

		<form class="searchForm" id="searchForm" method="post">
			<div class="card mb-3">
				<div class="card-body">
					<h4 class="card-title">按条件筛选查询记录</h4>
					<div class="module searchModule" th:object="${vo.dto}">

						<ul class="mb-3">
							<li>
								<label>医保定点机构</label>
								<div><input type="text" name="targetOrgNameKeywords" th:value="*{@util.fStr(targetOrgNameKeywords)}" /></div>
							</li>
							<li>
								<label>查询原因</label>
								<div><input type="text" name="queryReason" th:value="*{@util.fStr(queryReason)}" /></div>
							</li>
							<li style="width: 100%;"><label>查询时间</label>
								<input class="ht-dateInput" type="date" name="queryTimeStart" th:value="*{queryTimeStart}" placeholder="" data-options="endSelector:'[name=queryTimeEnd]'" />
								<span class="ht_dateText d-inlineBlock">至</span>
								<input class="ht-dateInput" type="date" name="queryTimeEnd" th:value="*{queryTimeEnd}" placeholder="" data-options="startSelector:'[name=queryTimeStart]'"/>
							</li>
						</ul>
						<div class="searchBtnContainer">
							<input class="btn btn-primary" type="submit" id="search" value="查询">
							<input class="btn btn-clear" type="clear" role="ClearButton" value="清空">
						</div>
					</div>
				</div>
			</div>
		</form>
		<form class="listForm" id="listForm" method="post">
			<div class="card mb-3 listModule" id="listModule">
				<div class="card-body">
					<h4 class="card-title">
						<span>查询记录列表</span>
						<a th:href="@{|/bank/payLog/create?from=payLog|}" class="btn btn-primary" role="openFrameWindow"><!--<i class="mdi mdi-content-copy"></i>-->新增查询</a>
					</h4>
					<div class="module">
						<div>
						<table cellpadding="0" cellspacing="0" class="hTable">
							<thead>
								<tr>
									<th class="">序号</th>
									<th class="">医保定点机构</th>
									<th class="">授权书编号</th>
									<th class="">查询时间</th>
									<th class="" style="width: 300px;">查询原因</th>
									<th class="">查询结果</th>
									<th class="">操作</th>
								</tr>
							</thead>
							<tbody>
							<tr th:each="li,item:${vo.page.list}">
								<td th:text="${item.index+vo.page.startRow}">序号</td>
								<td>
									<a role="openFrameWindow" th:if="${li.itfType=='1'}" th:href="@{|/bank/payLog/showMainInfoForNew?payLogId=${li.id}&targetOrgId=${li.targetOrgId}&pfmId=${li.pfmId}|}" th:text="${@util.fStr(li.targetOrgName)}" class="textLink-primary">
										医保定点机构
									</a>
									<span th:if="${li.itfType=='0'}" th:text="${@util.fStr(li.targetOrgName)}">医保定点机构</span>
								</td>
								<td><a role="openFrameWindow" th:href="@{|/base/auth/detail?id=${li.authId}&aid=${li.authAid}|}" th:text="${li.authNo}" class="textLink-primary">授权书编号</a></td>
								<td th:text="*{#dates.format(li.queryTime,'yyyy-MM-dd HH:mm:ss')}">查询时间（精确到秒）</td>
								<td th:text="${@util.fStr(li.queryReason)}">查询原因（如申请融资、贷前审批、贷后管理等）</td>
								<td>
									<span th:each="code, iterStat : ${li.payLogCodes}">
										<a role="openFrameWindowFull" th:href="@{|/bank/payLog/list?payLogId=${li.id}&targetOrgId=${li.targetOrgId}&payLogCode=${code}|}"
										   th:text="${code}"  th:if="${li.downloadEnabled=='1' && li.queryPayState=='1'}" target="bridge" class="textLink-primary">查询结果</a>
										<a class="btn btn-outline-primary btn-sm disabled" th:text="${code}" th:if="${li.downloadEnabled=='0' && li.queryPayState=='1'}"></a>
										<br th:unless="${iterStat.last}" />
									</span>
									<span th:if="${#lists.isEmpty(li.payLogCodes)}">-</span>
								</td>
								<td>
									<a class="btn btn-outline-primary btn-sm" th:href="@{|/bank/payLog/downloadDetail?id=${li.id}&aid=${li.aid}|}" th:if="${li.downloadEnabled=='1' && li.queryPayState=='1'}" target="bridge">下载</a>
									<a class="btn btn-outline-primary btn-sm disabled" th:if="${li.downloadEnabled=='0' && li.queryPayState=='1'}">下载</a>
								</td>
							</tr>
							</tbody>
						</table>
						<div class="noneRecord" th:if="${vo.page.total==0}">查无记录！</div>
						</div>
						<th:block th:include ="commHeaderInclude::pageInfoComm"></th:block>
					</div>
				</div>
			</div>
		</form>
	</div>
</body>
<script>
	var page=new ListPage();
	page.init();
	//seajs.use("/mcp/bank/insuranceInfo/js/list");
</script>
</html>